const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const schema = new Schema({
    id: {type: Schema.Types.ObjectId, unique: true, default: new mongoose.Types.ObjectId},
    serviceName: {type: String},
    uri: {type: String},
    host: {type: String},
    port: {type: Number},
    method: {type: String},
    description: {type: String},
    anonymous: {type: Number},
    internal: {type: Number},
    status: {type: Number},
    createTime: {type: Date, default: Date.now}
}, {
    autoIndex: false
});
mongoose.model('Route', schema);
